#!/bin/sh

if [ -z "$@" ];then
	name="nodejs"
        url="https://jenkins.xhaihua.cn/computer/$name/slave-agent.jnlp"
	secret="92501a74280e6fe70f8a127fe6ae6a7a68cbe9e388b8cd6722adb5371dbe31fe"
	dir="/opt/app/jenkins/home"
	sudo -u jenkins java -jar /agent.jar -jnlpUrl $url -secret $secret -workDir $dir #-noCertificateCheck 
else
	$@
fi
